#pragma once


#include <atlddx.h>
#include <atlcrack.h>

#include "resource.h"

#include "CoinSetting.h"

class CCoinSettingDlg : public CDialogImpl<CCoinSettingDlg>,
	public CWinDataExchange<CCoinSettingDlg>
{
public:
	CCoinSettingDlg(void);
	~CCoinSettingDlg(void);

	enum { IDD = IDD_DLG_COIN_SETTING };

	BEGIN_MSG_MAP(CCoinSettingDlg)
		MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
		COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
		COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
		COMMAND_HANDLER_EX(IDC_BTN_CANCEL, BN_CLICKED, OnBtnCancelBnClicked)
	//	COMMAND_HANDLER_EX(IDC_BTN_OK, BN_CLICKED, OnBtnOkBnClicked)		
		
		COMMAND_HANDLER(IDC_BTN_OK, BN_CLICKED, OnBnClickedBtnOk)
		COMMAND_HANDLER(IDC_BUTTON2, BN_CLICKED, OnBnClickedBtnCancel)
	END_MSG_MAP()


protected:

	KtvCoinConfig m_coinConfig;

	CEdit m_edtPlayTime;
	CEdit m_edtSongCoin;
	CEdit m_edtReduceCoinTime;
	CEdit m_edtClickNextNum;
	CEdit m_edtAutoCloseTips;
	
	CComboBox m_cbScreenMode;

	CEdit m_edtRemainTimeTips;
	CEdit m_edtRemainCoinTips;
	CEdit m_edtRemainSongTips;
	
	wstring m_strCloseTips;

public:


	LRESULT OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/);
	LRESULT OnCloseCmd(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/);

	LRESULT OnBtnCancelBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl);
	//LRESULT OnBtnOkBnClicked(WORD wNotifyCode, WORD wID, HWND hWndCtl);

	
	int ResetDlgText(void);
	int LoadConfig(void);
	int ShowConfig(void);
	int SaveConfig(void);
	
	LRESULT OnBnClickedBtnOk(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
	LRESULT OnBnClickedBtnCancel(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/);
};




